<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>digichef.registration.forms.RegistrationForm</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="digichef-module.html">Package&nbsp;digichef</a> ::
        <a href="digichef.registration-module.html">Package&nbsp;registration</a> ::
        <a href="digichef.registration.forms-module.html">Module&nbsp;forms</a> ::
        Class&nbsp;RegistrationForm
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="digichef.registration.forms.RegistrationForm-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class RegistrationForm</h1><p class="nomargin-top"><span class="codelink"><a href="digichef.registration.forms-pysrc.html#RegistrationForm">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_digichef_11" name="uml_class_diagram_for_digichef_11">
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html#username" title="digichef.registration.forms.RegistrationForm.username" alt="" coords="17,28,212,47"/>
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html#email" title="digichef.registration.forms.RegistrationForm.email" alt="" coords="17,47,212,65"/>
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html#password1" title="digichef.registration.forms.RegistrationForm.password1" alt="" coords="17,65,212,84"/>
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html#password2" title="digichef.registration.forms.RegistrationForm.password2" alt="" coords="17,84,212,103"/>
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html#clean_username" title="Validate that the username is alphanumeric and is not already in use." alt="" coords="17,105,212,124"/>
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html#clean" title="Verifiy that the values entered into the two password fields match." alt="" coords="17,124,212,143"/>
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html#save" title="Create the new ``User`` and ``RegistrationProfile``, and returns the ``User``." alt="" coords="17,143,212,161"/>
<area shape="rect" href="digichef.registration.forms.RegistrationForm-class.html" title="Form for registering a new user account." alt="" coords="16,11,213,163"/>
</map>
  <img src="uml_class_diagram_for_digichef_11.gif" alt='' usemap="#uml_class_diagram_for_digichef_11" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<pre class="literalblock">

Form for registering a new user account.

Validates that the requested username is not already in use, and
requires the password to be entered twice to catch typos.

Subclasses should feel free to add any additional validation they
need, but should either preserve the base ``save()`` or implement
a ``save()`` which accepts the ``profile_callback`` keyword
argument and passes it through to
``RegistrationProfile.objects.create_inactive_user()``.

</pre>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="clean_username"></a><span class="summary-sig-name">clean_username</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Validate that the username is alphanumeric and is not already
in use.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.registration.forms-pysrc.html#RegistrationForm.clean_username">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="digichef.registration.forms.RegistrationForm-class.html#clean" class="summary-sig-name">clean</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Verifiy that the values entered into the two password fields
match.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.registration.forms-pysrc.html#RegistrationForm.clean">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="digichef.registration.forms.RegistrationForm-class.html#save" class="summary-sig-name">save</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">profile_callback</span>=<span class="summary-sig-default">None</span>)</span><br />
      Create the new ``User`` and ``RegistrationProfile``, and
returns the ``User``.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.registration.forms-pysrc.html#RegistrationForm.save">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="digichef.registration.forms.RegistrationForm-class.html#username" class="summary-name">username</a> = <code title="forms.RegexField(regex= r'^\w+$', max_length= 30, widget= forms.TextIn\
put(attrs= attrs_dict), label= _(u'username'))">forms.RegexField(regex= r'^\w+$', max_length= 30, w<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="digichef.registration.forms.RegistrationForm-class.html#email" class="summary-name">email</a> = <code title="forms.EmailField(widget= forms.TextInput(attrs= dict(attrs_dict, maxle\
ngth= 75)), label= _(u'email address'))">forms.EmailField(widget= forms.TextInput(attrs= dict(a<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="digichef.registration.forms.RegistrationForm-class.html#password1" class="summary-name">password1</a> = <code title="forms.CharField(widget= forms.PasswordInput(attrs= attrs_dict, render_\
value= False), label= _(u'password'))">forms.CharField(widget= forms.PasswordInput(attrs=<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="digichef.registration.forms.RegistrationForm-class.html#password2" class="summary-name">password2</a> = <code title="forms.CharField(widget= forms.PasswordInput(attrs= attrs_dict, render_\
value= False), label= _(u'password (again)'))">forms.CharField(widget= forms.PasswordInput(attrs=<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="clean"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">clean</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="digichef.registration.forms-pysrc.html#RegistrationForm.clean">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Verifiy that the values entered into the two password fields
match. Note that an error here will end up in
``non_field_errors()`` because it doesn't apply to a single
field.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="save"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">save</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">profile_callback</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="digichef.registration.forms-pysrc.html#RegistrationForm.save">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Create the new ``User`` and ``RegistrationProfile``, and
returns the ``User``.

This is essentially a light wrapper around
``RegistrationProfile.objects.create_inactive_user()``,
feeding it the form data and a profile callback (see the
documentation on ``create_inactive_user()`` for details) if
supplied.

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="username"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">username</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
forms.RegexField(regex= r'^\w+$', max_length= 30, widget= forms.TextIn<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
put(attrs= attrs_dict), label= _(u'username'))
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="email"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">email</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
forms.EmailField(widget= forms.TextInput(attrs= dict(attrs_dict, maxle<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ngth= 75)), label= _(u'email address'))
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="password1"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">password1</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
forms.CharField(widget= forms.PasswordInput(attrs= attrs_dict, render_<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
value= False), label= _(u'password'))
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="password2"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">password2</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
forms.CharField(widget= forms.PasswordInput(attrs= attrs_dict, render_<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
value= False), label= _(u'password (again)'))
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Apr  1 02:28:23 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
